>> TGS_phase_analysis('Cr_single_crystal-2019-06-27-06.40um-5degrees-POS-1.txt','Cr_single_crystal-2019-06-27-06.40um-5degrees-NEG-1.txt',6.4,1)

f2 = 

     General model:
     f2(x) = A.*(erfc(q*sqrt(k*(x+start_time)))-beta*exp(-q^2*k*(x+start_time)
                    )./sqrt((x+start_time)))+B.*sin(2*pi*(peak_freq)*(x+
                    start_time)+p)*exp(-(x+start_time)/t)+D
     Coefficients (with 95% confidence bounds):
       A =     0.01627  (0.01569, 0.01684)
       k =   2.542e-05  (2.481e-05, 2.604e-05)
       beta =   7.739e-07  (-6.608e-07, 2.209e-06)
       B =    0.008197  (0.008089, 0.008305)
       p =      -2.122  (-2.132, -2.113)
       t =   2.452e-08  (2.404e-08, 2.501e-08)
       D =   0.0008244  (0.0007987, 0.0008501)
     Problem parameters:
       q =   9.817e+05
       start_time =       7e-10
       peak_freq =     5.5e+08

ans =

   5.5002e+08